<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
    
    /**
     * Loaf loafd view
     * @author tien.nguyen
     */
    public function _initLoadViewResource() {
        
        $this->bootstrap('layout');
        $layout = $this->getResource('layout');
        $view = $layout->getView();
        
        $this->_setNavigation($view);
    }
    
    /*
    protected function _initTranslate()
    {
        $translate = new Zend_Translate('gettext',
            APPLICATION_PATH . "/langs/",
                    null,
                    array('scan' => Zend_Translate::LOCALE_DIRECTORY));
        $registry = Zend_Registry::getInstance();
        $registry->set('Zend_Translate', $translate);
        //$translate->setLocale('en');
    }*/

    /**
     * 
     * @param type $view
     * @author tien.nguyen
     */
    private function _setNavigation($view) {
        $layout = new Zend_Config_Ini(APPLICATION_PATH . '/layouts/navigation.ini');
        $container = new Zend_Navigation($layout->navigation);
        $view->navigation($container);
    }
}

